package com.boang.nio;

import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

/*
@author:22567
@date:2024/12/13 10:11
*/
public class FilePaths {
    public static void main(String[] args) throws IOException {
        Path path = Paths.get("c:\\Users\\22567\\Desktop\\filepaths");
        Files.createDirectory(path);

        Path file = Paths.get("c:\\Users\\22567\\Desktop\\filepaths\\a.txt");
        Files.createFile(file);

        Path file1 = Paths.get("c:\\Users\\22567\\Desktop\\filepaths\\a.txt");
        BufferedWriter bufferedWriter = Files.newBufferedWriter(file1);
        bufferedWriter.write("abc");
        bufferedWriter.close();


    }
}
